<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>last-child测试</title>



    <style>
        .bg p:first-of-type {
            background-color: bisque;
        }
    </style>

</head>

<body>
    <div class="bg">
        <div class="test">aaa</div>
        <p>This is some text 1</p>
        <p>This is some text 2</p>
        <p>This is some text 3</p>
        <p>This is some text 4</p>
        <div class="test">aaa</div>
    </div>

</body>

</html>